from sqlalchemy import Column, Integer, String, Boolean
from app.db.session import Base

class User(Base):
    __tablename__ = "users"

    id = Column(Integer, primary_key=True, index=True)
    username = Column(String, unique=True, index=True)
    chinese_name = Column(String)
    password_hash = Column(String)
    source = Column(Integer, default=0)
    department = Column(String)
    position = Column(String)
    phone = Column(String)
    is_admin = Column(Integer, default=0)